package 责任链设计模式.风控;

/**
 * 第一级风控管理器
 */
public class OneLevelRiskControllManager extends RiskControllManager {


    public OneLevelRiskControllManager(String name) {
        super(name);
    }

    @Override
    void handleRequest(Request request) {
        RequestType requestType = request.getRequestType();
        if (requestType == RequestType.TRANSFER && request.getMoney() <= 100) {
            System.out.println(name + "处理通过了");
            next.handleRequest(request);
        } else {
            System.out.println(name + "不处理");
            next.handleRequest(request);
        }
    }
}
